package com.wnxy.controller;


import com.wnxy.dto.Result;
import com.wnxy.dto.StatusCode;
import com.wnxy.dto.TicketsDto;
import com.wnxy.service.TicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author alice
 * @since 2021-10-25
 */
@RestController
@RequestMapping("/ticket")
public class TicketController {
    @Autowired
    private TicketService ticketService;

    @GetMapping("/allTicket")
    public Result getAll(Integer performId) {
        System.out.println(performId);
        TicketsDto ticketsDto=ticketService.getAll(performId);
        return Result.getInstance().setFlag(true)
                .setStatusCode(StatusCode.SUCCESS.getCode())
                .setMessage("查询成功").setData(ticketsDto);
    }

}

